package cate.game.res.holy_pet;

import cate.common.table.common.CommonExcel;
import cate.common.table.d.GDParamTool;
import easy.java.dev.note.NoteField;
import lombok.experimental.UtilityClass;

/**
 * 灵宠常量
 *
 * @author ShenSL
 * @since 2023/8/25 19:51
 */
@UtilityClass
public class HolyPetConstants {
    @NoteField("排行奖励邮件")
    public static final int RANK_MAIL_ID = 100171;
    @NoteField("刷新景点消耗")
    public static String REFRESH_COST = "0:2:50";
    @NoteField("每日协助次数上限")
    public static int DAILY_SUPPORT_MAX = 5;
    @NoteField("战斗方案数量")
    public static int FIGHT_POS_NUM = 5;
    @NoteField("最大机缘日志条数")
    public static final int MAX_ADVENTURE_LOG_NUM = 30;

    /**
     * 从配置中读取常量
     *
     * @param common 通用配置
     */
    public static void loadFromTable(CommonExcel common) {
        REFRESH_COST = GDParamTool.getString(common.param, 201019, REFRESH_COST);
        DAILY_SUPPORT_MAX = GDParamTool.getInt(common.param, 201020, DAILY_SUPPORT_MAX);
        FIGHT_POS_NUM = GDParamTool.getInt(common.param, 201021, FIGHT_POS_NUM);
    }
}
